package com.heima.wemedia.utils.common;

import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.common.dtos.ResponseResult;

import java.util.List;

public class ServiceUtils {
    public static <T> ResponseResult<List<T>> buildPageResponse(
            int page, int reqPage, int reqSize, List<T> data) {
        ResponseResult<List<T>> responseResult = new PageResponseResult<>(
                page, reqPage, reqSize);
        responseResult.setData(data);
        return responseResult;
    }
}
